//配置动画
function indexIntro(introMask) {
  var mask = introMask.querySelector('.intro-logo')
  var e = mask.querySelector('.right'),
    t = mask.querySelector('.intro-load'),
    o = mask.querySelector('.load'),
    b = mask.querySelector('.ball')
  // eslint-disable-next-line no-undef
  gsap
    .timeline({
      onComplete: function () {
        introMask.remove()
      }
    })
    .to(o, {
      clipPath: 'circle(100% at 50% 50%)',
      duration: 0.85,
      ease: 'Power3.easeInOut'
    })
    .to(e, { scaleX: 0, duration: 1, ease: 'Power3.easeInOut' })
    .to(t, { rotateY: '90deg', duration: 0.5, ease: 'Power3.easeInOut' }, '<')
    .to(b, { x: 0, duration: 1 }, 0)
    .to(b, { delay: 0, duration: 0.75, width: '100%' }, 0)
    .fromTo(
      undefined,
      { x: 0, opacity: 0 },
      { x: 0, opacity: 1, delay: 0, stagger: 0.15, duration: 1, ease: 'Power3.easeOut' },
      '<-0.2 '
    )
}

indexIntro(document.getElementById('introMask'))
